package comcy.pj.goods.dao;

import comcy.pj.goods.pojo.Goods;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class GoodsDaoImpl implements GoodsDao {//bean的名字是类名goodsDaoImpl

    @Autowired
    private SqlSession sqlSession;

    @Override
    public List<Goods> findGoods() {

       // return sqlSession.selectList("com.cy.pj.goods.dao.GoodsDao.findGoods");

        return sqlSession.getMapper(GoodsDao.class).findGoods();


    }
}
